
/*****************************************************************************
 *
 * 作   者: 马婷婷 * 创建时间: 2020/12/15 15:41:30 *
 * Copyright (C) 2008 - 鹏业软件公司
 *
 *****************************************************************************/

import {DataPacket, NorDataList} from 'pengesoft-ng-lib';
import {Train} from './train.domain';

/**
 *
 */
export class TrainDto extends DataPacket {
// <<<<<<< HEAD
  train: Train;
  teacherName: string;

  constructor(options: {
    train?: Train;
    teacherName?: string;
  } = {}) {
    super();
    this.train = new Train(options?.train);
// =======
//   Train: Train;
//   teacherName: string;
//
//   constructor(options: {
//     Train?: Train;
//     teacherName?: string;
//   } = {}) {
//     super();
//     this.Train = new Train(options?.Train);
// >>>>>>> 114a0271d9ae48d67f42c6a79764287a47013b8b
    this.teacherName = options.teacherName || '';
  }
}

/**
 * 列表
 */
export class TrainDtoList extends NorDataList<TrainDto> {

  constructor(options: {
    _Items?: Array<TrainDto>
  } = {}) {
    super();
    if (options._Items) {
      for (const item of options._Items) {
        this.append(new TrainDto(item));
      }
    }
  }
}
